﻿Imports System.Data.OleDb
Imports System.Data
Imports Microsoft.VisualBasic

Public Class clsTransaction

    Sub InsertData(ByVal objCmd As OleDbCommand, ByVal cn As OleDbConnection, ByVal Trans As OleDbTransaction, ByVal CommandType As Integer, ByVal Table As String, ByVal Field As String, ByVal Value As String)

        Dim sql As String = "INSERT INTO " & Table & " ( " & Field & ") VALUES (" & Value & ")"

        objCmd = New OleDbCommand()
        With objCmd
            .Connection = cn
            .Transaction = Trans
            .CommandType = CommandType
            .CommandText = sql
        End With
        objCmd.ExecuteNonQuery()

    End Sub

End Class
